# Anthropic

All functionality related to Anthropic models.

[Anthropic](https://www.anthropic.com/) is an AI safety and research company, and is the creator of Claude.
This page covers all integrations between Anthropic models and LangChain.

## Installation

To use Anthropic models, you will need to install the `langchain-anthropic` package.
You can do this with the following command:

```
pip install langchain-anthropic
```

## Environment Setup

To use Anthropic models, you will need to set the `ANTHROPIC_API_KEY` environment variable.
You can get an Anthropic API key [here](https://console.anthropic.com/settings/keys)

## `ChatAnthropic`

`ChatAnthropic` is a subclass of LangChain's `ChatModel`.
You can import this wrapper with the following code:

```
from langchain_anthropic import ChatAnthropic
model = ChatAnthropic(model='claude-2.1')
```

Read more in the [ChatAnthropic documentation](/docs/integrations/chat/anthropic).

## `AnthropicLLM`

`AnthropicLLM` is a subclass of LangChain's `LLM`. It is a wrapper around Anthropic's 
text-based completion endpoints.

```python
from langchain_anthropic import AnthropicLLM

model = AnthropicLLM(model='claude-2.1')
```